package org.jgs1904.test;

/**
 * @author: 默苍璃
 * @date: 2022-09-09 10:53
 */
public class While {
    public static void main(String[] args) {
        int sum = 0;
        int n = 0;
        //正确设置循环条件
        while (n <= 100) {
            n++;
            sum = sum + n;
        }
        System.out.println(sum);
    }
}
